#ifndef DIALOG_CFDY_H
#define DIALOG_CFDY_H

#include <QDialog>
#include <QSqlQuery>
#include <QPrinter>
#include <QPainter>
#include <QMap>
#include <QTimer>
#include <QAxObject>

namespace Ui {
class Dialog_cfdy;
}

class Dialog_cfdy : public QDialog
{
    Q_OBJECT

public:

    explicit Dialog_cfdy(QWidget *parent = nullptr);
    ~Dialog_cfdy();
    void printPage();
    void savePrintStatus();
    void processData(QString);
    void tfPrint();

private slots:
    void closeEvent(QCloseEvent *event);
    //void on_leSjh_returnPressed();
    void on_pbSinglePrint_clicked();
    void onTimerOut();
    void on_pbStop_clicked();
    void on_pbStart_clicked();
    void on_pbSearch_clicked();
    void on_pbTf_clicked();
    void on_pbBldy_clicked();
    void on_pushButton_clicked();
    void on_lwYfy_clicked(const QModelIndex &index);
    void on_lwYfy_doubleClicked(const QModelIndex &index);
    void on_pbExit_clicked();
    void on_leSjh_returnPressed();
    void on_rbF_clicked();
    void on_rbB_clicked();
    void on_pbDisplay_clicked();

    void cbbTerminalTextChanged(QString arg1);

    void on_rbX_clicked();

private:
    Ui::Dialog_cfdy *ui;
    QSqlQuery *qrm, *qro, *qrot;
    QPrinter *prt;
    QPainter *pnt;
    bool acceptListClicked;
    int count;
    float ptScale;  //for printer, mm to point covnert.
    float fScale;
    QMap<QString,QString> mpPage;
    QTimer * tm;
    int timerCount; //定时中断次数，确定调用数据库查询间隔
    QString terminalCode,terminalName,deptCode;//工作窗口代码,科室代码
    QString clinicCode, doctName; //门诊号，医生姓名，打印退费单需要
    //QString officeOper; //dslFramer ,office operation need.
    QString cfPrinter, bzPrinter;

};

#endif // DIALOG_CFDY_H
